Skip to content

Conversation

@haszi
Copy link
Contributor

@haszi haszi commented Nov 22, 2025

Do not check entities files for XML validity as these are never valid on their own.

@haszi haszi requested a review from alfsb November 22, 2025 19:59
@haszi
Copy link
Contributor Author

haszi commented Nov 22, 2025

Test failures are unrelated to this PR.

@alfsb
Copy link
Member

alfsb commented Nov 23, 2025

Pure XML Entities entities.* files should not exist on doc repositories since the idempotent build project. If there are still some, these need to be deleted. I found only two on doc-pl/reference/dir.

So no, for this change.

But as you are at it, changing broken.php to ignore any paths that contain reference/wkhtmltox/wkhtmltox/bits/ would make the warnings a little better. I was hopeful to move these these bits/ files as entities, so another exception on broken.php would not be necessary, but never got to do it.

@haszi
Copy link
Contributor Author

haszi commented Nov 25, 2025

The reason for my opening this PR was that when I was running doc-base/configure.php locally, I got a huge number of warning due to these entities.*.xml files. As it seems, when configure.php is processing the source files, it calls another script (file-entities.php) that generates all entities.*.xml files. Only after processing of the source files is done is broken.php called at which point the entities.*.xml files always exist, generating ~900 errors for the close to 900 files.

Maybe this check should be run before processing the source files and generating the entities.*.xml files?

@alfsb
Copy link
Member

alfsb commented Nov 26, 2025

The reason for my opening this PR was that when I was running doc-base/configure.php locally, I got a huge number of warning due to these entities.*.xml files.

I cannot reproduce this. Here in my machine:

$ git -C doc-base/ pull
Already up to date.
$ git -C en/ pull
Already up to date.
$ php doc-base/configure.php 
doc-base: d5b5f0e1490de2d5bc3e3ff414bc2ffcef1f4261 
en:       198702020219835de11dc3064b7dc0590361ecab
(no warnings)
$ php doc-base/scripts/broken.php en
(no output)
$ find . | grep -F "/entities."
./doc-base/scripts/qa/entities.php
$ 

I cannot find any entities.*.xml, generated or not. Please send the exact commands you are using, and the complete output of configure.php.

As it seems, when configure.php is processing the source files, it calls another script (file-entities.php) that generates all entities.*.xml files. Only after processing of the source files is done is broken.php called at which point the entities.*.xml files always exist, generating ~900 errors for the close to 900 files.

The creation of a thousand of entities.*.xml files is the (very) old behaviour of file-entities.php. The actual behaviour is to create about a thousand of reference.*.ent files inside doc-base/temp/file-entities/.

$ ls doc-base/temp/file-entities
reference.apache.ent
reference.apache.functions.ent
reference.apcu.apcuiterator.ent
reference.apcu.ent
reference.apcu.functions.ent
...

Maybe this check should be run before processing the source files and generating the entities.*.xml files?

First, let's find out from where these entities.*.xml are generated. Please make sure your doc-base is at the master branch and updated.

@alfsb
Copy link
Member

alfsb commented Nov 26, 2025

Please send the exact commands you are using, and the complete output of configure.php.

Up to a few first lines of output of these entities.*.xml warnings.

First, let's find out from where these entities.*.xml are generated.

Tested the build scripts on Linux and Windows today, with and without --with-lang. No new entities.*.xml files, only the two wrong ones on doc-pl.

@haszi
Copy link
Contributor Author

haszi commented Nov 26, 2025

My bad! I pulled in a clean copy of both doc-base and en, and I can confirm that there are no longer any entities.*.xml files.

I'm closing this PR.

@haszi haszi closed this Nov 26, 2025
@haszi haszi deleted the Do-not-check-entities-files-for-XML-validity branch November 26, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants